<template>
  <el-container id="app">
    <el-aside width="280px" id="sideBar">
      <h1 id="logo" @click="toDoc" title="v5.3.0">ol demo for vue</h1>
      <h2>示例一</h2>
      <ol id="firstSideBar">
        <li>
          <router-link to="/helloWorld">Go to helloWorld</router-link>
        </li>
        <li>
          <router-link to="/feature">Go to feature</router-link>
        </li>
        <li>
          <router-link to="/gaode">Go to 高德</router-link>
        </li>
      </ol>
    </el-aside>
    <el-main>
      <div id="mapContainer">
        <router-view />
        <!-- <router-link>  默认会被渲染成一个 `<a>` 标签 -->
      </div>
    </el-main>
  </el-container>

</template>

<script>
export default {
  name: 'App',
  data() {
    return {

    }
  },
  methods: {
    // https://openlayers.org/en/latest/apidoc/
    toDoc: function () {
      window.open('https://openlayers.org/en/latest/apidoc/');
    }
  }
}
</script>

<style lang="scss" scoped>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  #sideBar {
    width: 280px;
    height: 100vh;
    margin: 20px 0 0 20px;
    float: left;
    background: #eee;
    #logo {
      margin: 0;
    }
    #firstSideBar {
      text-align: left;
    }
  }
  #mapContainer {
    width: calc(100%);
    float: right;
    background: #e4e4e4;
  }
}
</style>
